gir: patch ostree_repo_finder_avahi_new
authorFelix Krull <f_krull@gmx.de>
Thu, 23 Jul 2020 14:34:50 +0000 (16:34 +0200)
committerColin Walters <walters@verbum.org>
Fri, 6 May 2022 16:53:55 +0000 (12:53 -0400)
Should be fixed in the next upstream release

Ref: https://github.com/ostreedev/ostree/pull/2051

rust-bindings/rust/gir-files/OSTree-1.0.gir
rust-bindings/rust/src/auto/mod.rs
rust-bindings/rust/src/auto/repo_finder_avahi.rs
rust-bindings/rust/src/auto/versions.txt
rust-bindings/rust/sys/src/auto/versions.txt
rust-bindings/rust/sys/src/lib.rs

index 7e7b1d85767ee274c7b654f3242fa33411a2d858..e8b7fb117a64f06fc113e1b18183ef65965378fc 100644 (file)
@@ -12310,15 +12310,40 @@ Pass the results to ostree_repo_pull_from_remotes_async() to pull the given
            glib:type-name="OstreeRepoFinderAvahi"
            glib:get-type="ostree_repo_finder_avahi_get_type"
            glib:type-struct="RepoFinderAvahiClass">
-      <source-position filename="ostree-repo-finder-avahi.h" line="47"/>
+      <source-position filename="ostree/src/libostree/ostree-repo-finder-avahi.h"
+                       line="47"/>
       <implements name="RepoFinder"/>
-      <constructor name="new" c:identifier="ostree_repo_finder_avahi_new">
-        <source-position filename="ostree-repo-finder-avahi.h" line="54"/>
+      <constructor name="new"
+                   c:identifier="ostree_repo_finder_avahi_new"
+                   version="2018.6">
+        <doc xml:space="preserve"
+             filename="ostree/src/libostree/ostree-repo-finder-avahi.c"
+             line="1360">Create a new #OstreeRepoFinderAvahi instance. It is intended that one such
+instance be created per process, and it be used to answer all resolution
+requests from #OstreeRepos.
+
+The calling code is responsible for ensuring that @context is iterated while
+the #OstreeRepoFinderAvahi is running (after ostree_repo_finder_avahi_start()
+is called). This may be done from any thread.
+
+If @context is %NULL, the current thread-default #GMainContext is used.</doc>
+        <source-position filename="ostree/src/libostree/ostree-repo-finder-avahi.h"
+                         line="54"/>
         <return-value transfer-ownership="full">
+          <doc xml:space="preserve"
+               filename="ostree/src/libostree/ostree-repo-finder-avahi.c"
+               line="1375">a new #OstreeRepoFinderAvahi</doc>
           <type name="RepoFinderAvahi" c:type="OstreeRepoFinderAvahi*"/>
         </return-value>
         <parameters>
-          <parameter name="context" transfer-ownership="none">
+          <parameter name="context"
+                     transfer-ownership="none"
+                     nullable="1"
+                     allow-none="1">
+            <doc xml:space="preserve"
+                 filename="ostree/src/libostree/ostree-repo-finder-avahi.c"
+                 line="1362">a #GMainContext for processing Avahi
+   events in, or %NULL to use the current thread-default</doc>
             <type name="GLib.MainContext" c:type="GMainContext*"/>
           </parameter>
         </parameters>
index bcdead574527a5ffe31edece35b32a5f12b2a897..6a066f06b7cd4e6350a70fc53b786bf25e217b65 100644 (file)
@@ -33,8 +33,11 @@ pub use self::repo_finder::{RepoFinder, NONE_REPO_FINDER};
 #[cfg(any(feature = "v2018_6", feature = "dox"))]
 pub use self::repo_finder::RepoFinderExt;
 
+#[cfg(any(feature = "v2018_6", feature = "dox"))]
 mod repo_finder_avahi;
+#[cfg(any(feature = "v2018_6", feature = "dox"))]
 pub use self::repo_finder_avahi::{RepoFinderAvahi, RepoFinderAvahiClass, NONE_REPO_FINDER_AVAHI};
+#[cfg(any(feature = "v2018_6", feature = "dox"))]
 pub use self::repo_finder_avahi::RepoFinderAvahiExt;
 
 #[cfg(any(feature = "v2018_6", feature = "dox"))]
@@ -160,6 +163,7 @@ pub mod traits {
     pub use super::RepoFileExt;
     #[cfg(any(feature = "v2018_6", feature = "dox"))]
     pub use super::RepoFinderExt;
+    #[cfg(any(feature = "v2018_6", feature = "dox"))]
     pub use super::RepoFinderAvahiExt;
     #[cfg(any(feature = "v2018_6", feature = "dox"))]
     pub use super::RepoFinderMountExt;
index 641b9996e6d9982de79f3527f09d45b84942e05a..af9e709057feffa58cb4a24c2df47978b89c9423 100644 (file)
@@ -2,6 +2,7 @@
 // from gir-files (https://github.com/gtk-rs/gir-files)
 // DO NOT EDIT
 
+#[cfg(any(feature = "v2018_6", feature = "dox"))]
 use glib;
 use glib::object::IsA;
 use glib::translate::*;
@@ -20,7 +21,8 @@ glib_wrapper! {
 }
 
 impl RepoFinderAvahi {
-    pub fn new(context: &glib::MainContext) -> RepoFinderAvahi {
+    #[cfg(any(feature = "v2018_6", feature = "dox"))]
+    pub fn new(context: Option<&glib::MainContext>) -> RepoFinderAvahi {
         unsafe {
             from_glib_full(ostree_sys::ostree_repo_finder_avahi_new(context.to_glib_none().0))
         }
index 2b2845ae920a43d77c1b9df139257f34b0218cd1..34a0b4e53d1edd05afc51ad5605bf787e8fde1c6 100644 (file)
@@ -1,2 +1,2 @@
 Generated by gir (https://github.com/gtk-rs/gir @ 60cbef05)
-from gir-files (https://github.com/gtk-rs/gir-files @ e51adaf)
+from gir-files (https://github.com/gtk-rs/gir-files @ 2495460+)
index 2b2845ae920a43d77c1b9df139257f34b0218cd1..34a0b4e53d1edd05afc51ad5605bf787e8fde1c6 100644 (file)
@@ -1,2 +1,2 @@
 Generated by gir (https://github.com/gtk-rs/gir @ 60cbef05)
-from gir-files (https://github.com/gtk-rs/gir-files @ e51adaf)
+from gir-files (https://github.com/gtk-rs/gir-files @ 2495460+)
index cf6f5a102aa657c86594ded44468969ee0b474c8..9dbba33b67e4af570a1ea0b8e0514a4187f900c2 100644 (file)
@@ -1377,6 +1377,7 @@ extern "C" {
     // OstreeRepoFinderAvahi
     //=========================================================================
     pub fn ostree_repo_finder_avahi_get_type() -> GType;
+    #[cfg(any(feature = "v2018_6", feature = "dox"))]
     pub fn ostree_repo_finder_avahi_new(context: *mut glib::GMainContext) -> *mut OstreeRepoFinderAvahi;
     #[cfg(any(feature = "v2018_6", feature = "dox"))]
     pub fn ostree_repo_finder_avahi_start(self_: *mut OstreeRepoFinderAvahi, error: *mut *mut glib::GError);